import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'

//导入element-plus全局样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//导入Element-plus图标库
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

const app = createApp(App)

app.use(createPinia())
app.use(router)
//注册组件
app.use(ElementPlus, {
    locale: zhCn,
})
//注册图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

//挂载全局变量
app.config.globalProperties.$baseURL="http://localhost:8080";
app.mount('#app')
